package com.aifast.common.forUpdate;

import com.aifast.common.dict.DictBind;
import com.aifast.common.dict.DictBindType;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.ss.formula.functions.T;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author fujian
 * @since 2022/11/19 16:39
 */
@TableName("log_for_update")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ForUpdate implements Serializable {

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @DictBind(mode = DictBindType.JOIN,tableName = "sys_user",columns = "real_name",target = "userName")
    private Integer userId;

    @DictBind(mode = DictBindType.JOIN,tableName = "sys_org",columns = "name",target = "orgName")
    private Integer orgId;

    /**
     * 修改内容 包括修改前修改后的数据
     */
    private String content;

    private String createTime;

    private String tableName;

    private Object tableDataId;

    private Integer tenantId;

    /**
     * 修改前的数据
     */
//    private T oldValue;
    /**
     * 修改后的数据
     */
//    private T newValue;

}
